<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/','HomeController@index');


Route::get('/admin',function () {
    return view('admin.login');
});



Route::post('/admin/login','Admin\AdminController@login');
Route::post('/admin/cateadd','Admin\CateController@add');
Route::post('/admin/chapteradd','Admin\ChapterController@add');
Route::post('/admin/imageupload','Admin\ImageController@upload');
Route::post('/admin/getcate','Admin\CateController@getcate');
Route::post('/admin/getchapters','Admin\ChapterController@getchapters');
Route::post('/admin/suboneadd','Admin\SuboneController@add');
Route::post('/admin/subonesave','Admin\SuboneController@saveone');
Route::post('/admin/subone/getlist','Admin\SuboneController@getlist');
Route::post('/admin/subone/delsid','Admin\SuboneController@delsid');
Route::post('/admin/subone/cateadd','Admin\SuboneController@cateadd');
Route::get('/admin/subone/GetSubOneIamgeCate','Admin\SuboneController@GetSubOneIamgeCate');
Route::get('/admin/subone/GetImageCate','Admin\SuboneController@GetImageCate');

Route::post('/zy','Admin\SuboneController@zy');
Route::post('/yc','Admin\SuboneController@yc');
Route::post('/GetImageLevel2','Admin\SuboneController@GetImageLevel2');
Route::get('/GetVideoInfo/{id}', 'HomeController@video');



Route::any('/admin/{all}',function () {
    return view('admin.master');
});

Route::any('/admin/{all}/{id}',function () {
    return view('admin.master');
});
Route::any('/admin/{all}/{alls}/{id}',function () {
    return view('admin.master');
});


Route::post('/subonesave','Admin\SuboneController@save');

//Auth::routes();
//
//Route::get('/home', 'HomeController@index')->name('home');



Route::get('/{all}/{id}',function (){
    return view('home.master');
});